﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HST.ZWParking.Domain.Entities;
using HST.ZWParking.Domain.Repositories;

namespace HST.ZWParking.Application.Service.Implementation
{
    public class ProvinceService : IProvinceService
    {
        private IProvinceRepository _provinceRepository;

        public ProvinceService(IProvinceRepository provinceRepository)
        {
            _provinceRepository = provinceRepository;
        }

        public IEnumerable<Province> GetAll()
        {
            return _provinceRepository.GetAll();
        }

        public void Add(Province province)
        {
            _provinceRepository.Add(province);
            _provinceRepository.UnitOfWork.Commit();
        }
    }
}
